package com.powernode.controller;

import com.powernode.commons.Result;
import com.powernode.commons.ResultException;
import com.powernode.pojo.Goods;
import com.powernode.service.GoodsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author X
 * @date 2021/10/28
 */
@SuppressWarnings({"all"})
@RestController
@RequestMapping("/goods")
public class GoodsController {

    @Autowired
    private GoodsService goodsService;

    @RequestMapping("/items")
    public Result items(){
        List<Goods> list = goodsService.findByList();
        return Result.OK(list);
    }
}
